package wq.gdky005.util.RASAndMD5;
public class Main {

	public static void main(String[] args) throws Exception {

		String s = SecurityUtil.desEncode("867064018587749", "86706401");
		System.out.println(s);
//		System.out.println(PrivateUtil.publicKey);
		
		String data = "86706401f188ad3613b31219";
		String a = SecurityUtil.rsaEncode(data,
				PrivateUtil.publicKey);
		System.out.println(a);
		a = "d1A3DaJQKUAUGNoP+KUiQDahmMm8/T28sIqQTUPkkjAC0MOSiWFP9/yH2PnvjmdNnSDwtZ2mfCFC2WJyuT9aFQ==";
		String rsaDec = SecurityUtil.rsaDecode(a, PrivateUtil.privateKey);
		System.out.println(rsaDec);
		
		
		System.out.println("-----------"+SecurityUtil.desDecode(s, "86706401"));
		System.out.println("是否和原数字一样：" + rsaDec.equals(data));

	}
}
